<?php
/**
 * Created by PhpStorm.
 * User: david
 * Date: 5/11/19
 * Time: 3:03 PM
 */

namespace App\Transformers;


use App\Models\Role;
use League\Fractal\TransformerAbstract;

class RoleTransformer extends TransformerAbstract
{
    public function transform(Role $role)
    {
        return [
            'id' => $role->id,
            'name' => $role->name,
            'name_cn' => $role->name_cn,
            'desc' => $role->desc,
        ];
    }
}